<?php if (! defined ( 'BASEPATH' )) exit ( 'No direct script access allowed' );

class F_flight_scheduler extends MY_Model {
	
    function __construct() {
    	$table_name = strtolower(get_called_class()); // you can refer to $table_name as specific name
    	$table_fields_info = array(); // you can add table fields into this array()
    	
        parent::__construct($table_name, $table_fields_info);
    }
    
    function get_all_from_to_airport($scheduler_date_id) {
    	$sql_str =
    	"SELECT DISTINCT f_flight_scheduler.from_airport_id AS fa_id, f_flight_scheduler.to_airport_id AS ta_id
    	FROM `f_flight_scheduler`
    	WHERE
    	f_flight_scheduler.scheduler_date_id = {$scheduler_date_id}
    	AND
    	f_flight_scheduler.from_airport_id IN (
    	SELECT DISTINCT f_flight_scheduler.from_airport_id
    	FROM `f_flight_scheduler`
    	WHERE
    	f_flight_scheduler.scheduler_date_id = {$scheduler_date_id}
    	)";
    	 
    	return $this->db->query($sql_str)->result_array();
    }
}

/* This file was generated by class: Tool, function: generate_model */
/* End of file f_flight_scheduler.php */
/* Location: ./application/models/f_flight_scheduler.php */
